package com.User.Userservice.Server.impl;

import com.User.Userservice.Mapper.UserMapper;
import com.User.Userservice.POJO.User;
import com.User.Userservice.Server.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public User save(User user) {
        userMapper.insert(user);
        return userMapper.getInfoByNickName(user.getNickname());
    }


}
